
package com.feib.soeasy.service;

import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import com.feib.soeasy.model.FormatDefinition;
import com.feib.soeasy.model.Group;
import com.feib.soeasy.model.LabelValue;
import com.feib.soeasy.pagination.PaginatedList;


/**
 * @title (#)FormatDefinitionService.java<br>
 * @description 帳單匯入格式(收款類別)邏輯介面<br>
 * @author Jimmy Liu<br>
 * @version 1.0.0 2010/11/25
 * @copyright Far Eastern International Bank Copyright (c) 2010<br>
 * @2010/11/20 create by Jimmy Liu<br>
 */
@Transactional(readOnly = true)
public interface FormatDefinitionService {

    /**
     * 收款類別 Key-Value 格式資料
     * @param formatDefinition 查詢條件
     * @return
     */
    public List<LabelValue> findLabelValueByFormatDefinition(FormatDefinition formatDefinition, boolean includeBatchUsed);
    
    /**
     * 查詢帳單業者所屬的帳單匯入格式
     * @param group
     * @param paginationConfig
     * @return
     */
    public PaginatedList<FormatDefinition> queryByGroup(Group group, PaginatedList<FormatDefinition> paginationConfig);
    
    public FormatDefinition queryByPk(Long formatDefinitionPk);

    /**
     * @param formatDefinitionPk
     * @return
     */
    public FormatDefinition getFormatDefinitionByPk(Long formatDefinitionPk);

    /**
     * @param formatDefinition
     * @return
     */
    @Transactional(readOnly = false)
    public FormatDefinition save(FormatDefinition formatDefinition);

    /**
     * @param formatDefinition
     */
    @Transactional(readOnly = false)
    public void delete(FormatDefinition formatDefinition);

    /**
     * @param editGroup
     * @return
     */
    public int countFormatDefinitionByGroup(Group group);
    

}
